<?php
/**
 * Here the class '\UF\ArgumentFormatException' is defined.
 *
 * @category   UniKap-Framework
 * @package    Core
 * @subpackage Exceptions
 * @author     Ulf -UniKado- Kadner <ulfikado@gmail.com>
 * @since      2014-03-29 16:17
 * @version    0.1
 */

namespace UF
{

    /**
     * This exception is thrown, if a mathod is called with a attribut/parameter with a invalid/unknown format.
     *
     * The class extends {@see \UF\ArgumentException}
     *
     * @since      v0.1
     */
    class ArgumentFormatException extends \UF\ArgumentException
    {

        # <editor-fold defaultstate="collapsed" desc="C O N S T R U C T O R">

        /**
         * Inits a new instance.
         *
         * @param string     $arg      The argument/parameter name.
         * @param mixed      $value    The argument/parameter value
         * @param string     $message  A optional error message
         * @param int        $code     The optional error code (Defaults to \E_USER_ERROR)
         * @param \Exception $previous A optional previous exception
         * @since  v0.1
         */
        public function __construct( $arg, $value, $message = null, $code = \E_USER_ERROR, \Exception $previous = null )
        {
            parent::__construct(
                $arg, $value, \UF\_( '_core', 'Argument is illegal or has a unknown format.' ) .
                    ( empty( $message ) ? '' : ' ' . $message ),
                $code, $previous
            );
        }

        # </editor-fold>

    }

}

